package com.zm.campus.service;

import com.zm.campus.pojo.CommPointTh;
import com.zm.campus.pojo.RespBean;
import com.zm.campus.pojo.TreeHole;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zm.campus.query.TreeHoleQuery;
import com.zm.campus.vo.AuditListVo;
import com.zm.campus.vo.AuditTreeHoleVo;
import com.zm.campus.vo.LoginReturnVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zm

 */
public interface ITreeHoleService extends IService<TreeHole> {
    //获取所有树洞的列表信息
    RespBean getAllTreeHole(TreeHoleQuery treeHoleQuery);

    //评论树洞
    RespBean commentsTreeHole(CommPointTh commPointTh) throws IOException;

    //树洞点赞、取消点赞
    RespBean addOrCancelGPoint(Long thId,Boolean isPoint,String pointUserId);

    //提交树洞审核
    RespBean submitTreeHole(AuditTreeHoleVo auditTreeHoleVo);

    //管理员审核树洞
    RespBean registerTreeHole(AuditListVo auditListVo,Boolean isAudit,String role);

    //删除指定id的树洞
    RespBean deleteTreeHoleById(Long thId,String role);

    //获取当前需要审核的树洞的数量
    RespBean getNewAudit(String userId);

    //管理员获取所有待审核的树洞
    RespBean getAllAudit(LoginReturnVo loginReturnVo, HttpServletRequest request);

    RespBean updateTreeAvatar(MultipartFile treeAvatarFile, String userId,HttpServletRequest request) throws IOException;

    //获取当前登录用户所在学校的树洞的图片
    RespBean getTreeAvatar(String userId);

    RespBean getNewCommentByUid(String userId);
}
